<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>银行管理系统 - 登录</title>
    <link rel="stylesheet" href="/static/style.css">
    <style>
        .login-container {
            max-width: 400px;
            margin: 60px auto;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(10px);
            border-radius: 24px;
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
            padding: 40px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            animation: slideInUp 0.6s ease;
        }
        
        .login-header {
            text-align: center;
            margin-bottom: 30px;
        }
        
        .login-header h1 {
            color: #2d8cf0;
            font-size: 28px;
            margin-bottom: 10px;
            font-weight: 700;
        }
        
        .login-header p {
            color: #666;
            font-size: 14px;
        }
        
        .form-group {
            margin-bottom: 20px;
        }
        
        .form-group label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #555;
            font-size: 14px;
        }
        
        .form-group input, .form-group select {
            width: 100%;
            padding: 14px 16px;
            border: 2px solid #e1e5e9;
            border-radius: 12px;
            font-size: 16px;
            transition: all 0.3s ease;
            background: #fff;
        }
        
        .form-group input:focus, .form-group select:focus {
            outline: none;
            border-color: #2d8cf0;
            box-shadow: 0 0 0 3px rgba(45, 140, 240, 0.1);
            transform: translateY(-2px);
        }
        
        .login-btn {
            width: 100%;
            background: linear-gradient(135deg, #2d8cf0 0%, #74ebd5 100%);
            color: white;
            border: none;
            padding: 16px;
            border-radius: 12px;
            cursor: pointer;
            font-size: 18px;
            font-weight: 600;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(45, 140, 240, 0.3);
            margin-top: 10px;
        }
        
        .login-btn:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 25px rgba(45, 140, 240, 0.4);
            background: linear-gradient(135deg, #1a6fb3 0%, #5dd4c7 100%);
        }
        
        .login-btn:active {
            transform: translateY(-1px);
        }
        
        .error-message {
            background: linear-gradient(135deg, #ff4d4f 0%, #ff7875 100%);
            color: white;
            padding: 12px 16px;
            border-radius: 8px;
            margin-bottom: 20px;
            text-align: center;
            font-weight: 500;
            box-shadow: 0 4px 15px rgba(255, 77, 79, 0.3);
        }
        
        .role-selector {
            display: flex;
            gap: 10px;
            margin-bottom: 20px;
        }
        
        .role-option {
            flex: 1;
            text-align: center;
        }
        
        .role-option input[type="radio"] {
            display: none;
        }
        
        .role-option label {
            display: block;
            padding: 12px;
            background: #f8fafc;
            border: 2px solid #e1e5e9;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 500;
        }
        
        .role-option input[type="radio"]:checked + label {
            background: linear-gradient(135deg, #2d8cf0 0%, #74ebd5 100%);
            color: white;
            border-color: #2d8cf0;
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(45, 140, 240, 0.3);
        }
        
        @keyframes slideInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        @media (max-width: 480px) {
            .login-container {
                margin: 20px;
                padding: 30px 24px;
            }
        }
    </style>
</head>
<body>
    <div class="login-container">
        <div class="login-header">
            <h1>🏦 银行管理系统</h1>
            <p>请选择身份并登录</p>
        </div>
        
        {% if error %}
        <div class="error-message">
            {{ error }}
        </div>
        {% endif %}
        
        <form method="post" action="/login">
            <div class="form-group">
                <label for="username">用户名</label>
                <input type="text" id="username" name="username" placeholder="请输入用户名" required>
            </div>
            
            <div class="form-group">
                <label for="password">密码</label>
                <input type="password" id="password" name="password" placeholder="请输入密码" required>
            </div>
            
            <div class="form-group">
                <label>选择身份</label>
                <div class="role-selector">
                    <div class="role-option">
                        <input type="radio" id="admin" name="role" value="admin" checked>
                        <label for="admin">👨‍💼 管理员</label>
                    </div>
                    <div class="role-option">
                        <input type="radio" id="customer" name="role" value="customer">
                        <label for="customer">👤 客户</label>
                    </div>
                </div>
            </div>
            
            <button type="submit" class="login-btn">
                登录系统
            </button>
        </form>
        
        <div style="text-align: center; margin-top: 20px; color: #666; font-size: 12px;">
            <p>测试账号：</p>
            <p>管理员：admin1 / adminpass</p>
            <p>客户：customer1 / custpass</p>
        </div>
    </div>
</body>
</html> 